package operation.API;

import java.time.Duration;
import java.time.LocalDateTime;

public class demo02 {
    public static void main(String[] args) {
//        二:计算出自己来到这个世界上多少天
//        tips:根据毫秒值换算
        LocalDateTime localDateTime=LocalDateTime.of(2000,8,28,12,1,1);
        LocalDateTime localDateTime1=LocalDateTime.of(2021,2,24,20,15);
        Duration duration=Duration.between(localDateTime,localDateTime1);
        System.out.println("总共的天数为:"+duration.toDays());
        System.out.println("总共的毫秒为:"+duration.toNanos());

    }
}
